﻿/* 
 * Since 2008 - 2012
 */

package com.hh.bss.talent.service;

import java.io.File;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.hh.bss.auth.client.OnlineUser;
import com.hh.bss.base.BusinessService;
import com.hh.bss.common.page.Page;
import com.hh.bss.project.entity.ContractJobCvRecom;
import com.hh.bss.project.entity.SearchProjectCv;
import com.hh.bss.talent.entity.Cv;
import com.hh.bss.talent.entity.CvAttachment;
import com.hh.bss.talent.entity.CvContactDetail;
import com.hh.bss.talent.entity.CvSalary;
import com.hh.bss.talent.vo.query.CvCustomerContacterQuery;
import com.hh.bss.talent.vo.query.CvQuery;
import com.hh.bss.talent.vo.query.CvSuccessQuery;

public interface CvService<E, PK extends Serializable> extends BusinessService<E, PK> {

	public Page findPage(CvQuery query);

	public Page findCvPage(CvQuery query);

	public Page findCvProjectPage(CvQuery query);

	public Map getCvInfoById(Integer id);

	public Cv getById(Integer id);

	public Map<String, Object> getCvHtml(Integer id);

	public Page findSuccessCvPage(CvSuccessQuery query);

	public void updateWithContactList(E entity, List entitylist);

	public void saveWithContentList(E entity, List entitylist);

	public void saveCompanyTree(SearchProjectCv search);

	public Integer getCompanyId(String companyName);

	public void removeById(Integer id);

	public boolean isExistSearchProjectCv(Integer cvId, String companyId);

	public boolean checkUser(Cv cv, List<CvContactDetail> list);

	public boolean checkContact(Cv cv, List<CvContactDetail> list);

	public Page findCustomerContacterCvPage(CvCustomerContacterQuery query);

	public void updateCvContact(Integer cvId);

	public boolean isProtectCv(Integer cvId);

	public void updateCvStatus(Integer cvId);
	
	public void updateCvStatus(CvAttachment cvAttachment);

	public void doCompanyContacter(Cv entity);

	public void doCompanyCv(Cv entity);

	public void cvApplyJob(Integer jobId, Cv cv, CvSalary cvSalary, String cvMobile, String cvEmail);

	public File genRecomDoc(HttpServletRequest request, OnlineUser onlineUser, Integer cvId);

	public File genRecomDocEn(HttpServletRequest request, OnlineUser onlineUser, Integer cvId);

	public void importCvFromExcel(String fileName);

	public boolean hasAccountPn(Integer cvId);

	public Page findCvDelPage(CvQuery cvQuery);

	public Page findCvMergePage(CvQuery cvQuery);

	public void cvMerger(String id, String cvIds);
	public Page findSimpleCvPage(CvQuery query);

	public Page findSameOfDelCvPage(CvQuery cvQuery);

	public void recoverCv(String ids);
}
